package com.shanzmoo.admin.domain.dto;

import cn.hutool.core.bean.BeanUtil;
import com.shanzmoo.db.store.entity.StoreMemberStockIoEntity;

import java.time.LocalDateTime;
import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;


/**
 * 仓储用户库存流水 保存对象
 *
 * @author Gzhao 2021-03-08
 */
@Data
@ApiModel("仓储用户库存流水-保存对象")
public class StoreMemberStockIoSaveDTO implements Serializable {

    private static final long serialVersionUID = 1L;


    @ApiModelProperty(value = "商品sku")
    private String sku;

    @ApiModelProperty(value = "出入库类型")
    private Integer type;

    @ApiModelProperty(value = "入（出）库仓库编码")
    private String storeCode;

    @ApiModelProperty(value = "库存流向：1-入库,0-出库")
    private Boolean flow;

    @ApiModelProperty(value = "sku数量")
    private Integer skuNum;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "供货单号")
    private String orderNo;

    @ApiModelProperty(value = "创建人")
    private Integer createUser;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "逻辑删除，0-未删除 1-已删除")
    private Boolean deleted;

    public StoreMemberStockIoEntity convertEntity() {
        StoreMemberStockIoEntity target = new StoreMemberStockIoEntity();
        BeanUtil.copyProperties(this, target, true);
        return target;
    }
}
